package concretebuilder;

import abstractbuilder.AbstractBuilder;

/**
 * @Author buyee
 * @Date 2022/7/4 下午8:02
 */
public class TextBuilder extends AbstractBuilder {

    private StringBuilder buffer = new StringBuilder();

    @Override
    public String builder() {
        return buffer.toString();
    }

    @Override
    public void makeTitle(String title) {
        buffer.append("[" + title + "]");
    }

    @Override
    public void makeBody(String body) {
        buffer.append("{" + body + "}");
    }
}
